﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Jemgine.Data
{
    public enum LabelType
    {
        Name,
        Output,
        Input,
        Reference
    }

    public class EditorDrawData
    {
        public Renderer.RenderContext Renderer;
        public Data.MapData Map;
        public Action<String, Vector2, LabelType> AddLabel;

        public bool DrawDecomposedPolygons = false;
        public bool DrawTexturedPolygons = false;
        public bool DrawSpriteOutlines = true;

        public Jemgine.Engine.EpisodeContentManager Content;
        public Texture2D GetTexture(String name) { return Content.GetTexture(name); }

        public static Vector4 DrawColor(SelectionType Type)
        {
            switch (Type)
            {
                case SelectionType.Selected:
                    return Color.Red.ToVector4();
                case SelectionType.NotSelected:
                    return Color.Blue.ToVector4();
                case SelectionType.WorkingSet:
                    return Color.White.ToVector4();
                case SelectionType.MultiSelected:
                    return Color.Orange.ToVector4();
            }
            throw new InvalidProgramException();
        }
    }

    public enum SelectionType
    {
        NotSelected,
        WorkingSet,
        Selected,
        MultiSelected,
    }

    public interface EditorDrawable
    {
        void Draw(
            int ID,
            EditorDrawData Context,
            SelectionType Selected);

        
    }

}
